<div class="tab lf">
    <span class="no-activitie" routerLink="/login">
        < {{'login' | translate}} </span> </div> <div class="register-body">

            <div class="form-databody-h">
                <h1 *ngIf='!isEmail'>{{'registerPage.html1' | translate}}</h1>
                <h1 *ngIf='isEmail'>{{'registerPage.html2' | translate}}</h1>
                <a *ngIf='!isEmail' (click)="onChangType(true)">{{'registerPage.html2' | translate}}</a>
                <a *ngIf='isEmail' (click)="onChangType(false)">{{'registerPage.html1' | translate}}</a>
            </div>

            <div class="form-databody white-input">
                <form *ngIf='isEmail' autocomplete="off" off [formGroup]="registerEmailForm"
                    (ngSubmit)="onSave(registerEmailForm)">

                    <div class="weui-cell weui-cell_vcode">
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="text" autocomplete="off" off
                                placeholder="{{'registerPage.input-mail' | translate}}" formControlName="email" autocomplete="off" />
                        </div>
                        <div class="weui-cell__ft"
                            *ngIf='!registerEmailForm.controls.email.valid && registerEmailForm.controls.email.dirty'><i
                                style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
                    </div>

                    <div class="weui-cell weui-cell_vcode">
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="number" formControlName="verifyCode" autocomplete="off" 
                                placeholder="{{'registerPage.input-mailCode' | translate}}" />
                        </div>
                        <div class="weui-cell__ft phone-btn">
                            <a (click)='toSendCode()'
                                *ngIf='!sendCodeType'>{{'registerPage.input-mailCode-get' | translate}}</a>
                            <a *ngIf='sendCodeType'>{{sendCodeNum}}{{'registerPage.second' | translate}}</a>
                        </div>
                        <div class="weui-cell__ft"
                            *ngIf='!registerEmailForm.controls.verifyCode.valid && registerEmailForm.controls.verifyCode.dirty'>
                            <i style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
                    </div>

                    <div class="weui-cell weui-cell_vcode">
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="password"
                                placeholder="{{'loginPage.input-password' | translate}}" formControlName="loginPw"
                                autocomplete="new-password" autocomplete="off"  />
                        </div>
                        <div class="weui-cell__ft" *ngIf='registerEmailForm.errors?.newConfirmPasswordError'><i
                                style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
                    </div>

                    <div class="weui-cell weui-cell_vcode">
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="password"
                                placeholder="{{'registerPage.input-rePassword' | translate}}"
                                autocomplete="new-password" formControlName="reLoginPw" autocomplete="off"  />
                        </div>
                        <div class="weui-cell__ft" *ngIf='registerEmailForm.errors?.newConfirmPasswordError'><i
                                style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
                    </div>

                    <div class="register-subbtn">
                        <button weui-button disabled='{{!registerEmailForm.valid}}'>{{'register' | translate}}</button>
                    </div>
                    <div class="register-to-login">
                        <a routerLink="/login">{{'registerPage.html3' | translate}}</a>
                    </div>
                </form>

                <form *ngIf='!isEmail' autocomplete="off" [formGroup]="registerMobileForm"
                    (ngSubmit)="onSave(registerMobileForm)">

                    <div class="weui-cell weui-cell_vcode weui-cell_select">
                        <div class="weui-cell__hd">
                            <select class="weui-select" formControlName="phoneId" autocomplete="off" >
                                <option *ngFor="let item of selData" value="{{item.id}}">{{item.name}}</option>
                            </select>
                        </div>
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="tel"
                                placeholder="{{'registerPage.input-phone' | translate}}" formControlName="mobile"
                                autocomplete="off" off autocomplete="off" maxlength='11' />
                        </div>
                        <div class="weui-cell__ft"
                            *ngIf='!registerMobileForm.controls.mobile.valid && registerMobileForm.controls.mobile.dirty'>
                            <i style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
                    </div>

                    <div class="weui-cell weui-cell_vcode">
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="number" formControlName="verifyCode" name="verifyCode"
                                placeholder="{{'registerPage.input-mailCode' | translate}}" />
                        </div>
                        <div class="weui-cell__ft phone-btn">
                            <a (click)='toSendCode("mobile")'
                                *ngIf='!sendCodeType'>{{'registerPage.input-mailCode-get' | translate}}</a>
                            <a *ngIf='sendCodeType'>{{sendCodeNum}}{{'registerPage.second' | translate}}</a>
                        </div>
                        <div class="weui-cell__ft"
                            *ngIf='!registerMobileForm.controls.verifyCode.valid && registerMobileForm.controls.verifyCode.dirty'>
                            <i style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
                    </div>

                    <div class="weui-cell weui-cell_vcode">
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="password"
                                placeholder="{{'loginPage.input-password' | translate}}" formControlName="loginPw"
                                autocomplete="new-password" autocomplete="off"  />
                        </div>
                        <div class="weui-cell__ft" *ngIf='registerMobileForm.errors?.newConfirmPasswordError'><i
                                style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
                    </div>

                    <div class="weui-cell weui-cell_vcode">
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="password"
                                placeholder="{{'registerPage.input-rePassword' | translate}}"
                                autocomplete="new-password" formControlName="reLoginPw" autocomplete="off"  />
                        </div>
                        <div class="weui-cell__ft" *ngIf='registerMobileForm.errors?.newConfirmPasswordError'><i
                                style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
                    </div>

                    <div class="register-subbtn">
                        <button weui-button disabled='{{!registerMobileForm.valid}}'>{{'register' | translate}}</button>
                    </div>
                    <div class="register-to-login">
                        <a routerLink="/login">{{'registerPage.html3' | translate}}</a>
                    </div>
                </form>
            </div>

</div>